#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int compute(unsigned int x) {
	int count = 0;
	while (x) {
		if (x % 2 == 1) {
			count++;
		}
		x /= 2;
	}
	return count;

}
int main() {
	int ret = 0;
	scanf("%d", &ret);
	int end = compute(ret);
	printf("%d\n", end);
	return 0;
}
